import './assets/main.css'

import { createApp } from 'vue'


import App from './App.vue'
import axios from 'axios'
import router from './router'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
//国际化
import zhCn from 'element-plus/es/locale/lang/zh-cn'

//pinia
import { createPinia } from 'pinia'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'

//Token
  // 数据提交后端要加入新的Token值
  axios.defaults.headers.common["Authorization"] =
  "Bearer " + localStorage.getItem("Token");

const app = createApp(App)

const pinia = createPinia()
pinia.use(piniaPluginPersistedstate)

app.use(pinia)
app.use(router)
app.use(ElementPlus)

//国际化
app.use(ElementPlus, {
    locale: zhCn,
  })

app.mount('#app')
